import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/Latest',
    name: 'Latest',
    component: () => import('../views/Latest.vue')
  },
  {
    path: '/Hottest',
    name: 'Hottest',
    component: () => import('../views/Hottest.vue')
  },
  {
    path: '/personal',
    name: 'personal',
    component: () => import('../views/personal.vue')
  },
  {
    path: '/Historys',
    name: 'Historys',
    component: () => import('../views/Historys.vue')
  },
  {
    path: '/commentshelf',
    name: 'commentshelf',
    component: () => import('../views/commentshelf.vue')
  },
  {
    path: '/denglv',
    name: 'denglv',
    component: () => import('../views/denglv.vue')
  },
  {
    path: '/comment',
    name: 'comment',
    component: () => import('../views/comment.vue')
  },
  {
    path: '/email',
    name: 'email',
    component: () => import('../views/email.vue')
  },
  {
    path: '/report',
    name: 'report',
    component: () => import('../views/report.vue')
  },
  {
    path: '/read',
    name: 'read',
    component: () => import('../views/read.vue')
  },
  {
    path: '/shangchuan',
    name: 'shangchuan',
    component: () => import('../views/shangchuan.vue')
  },
  {
    path: '/forget',
    name: 'forget',
    component: () => import('../views/forget.vue')
  },
  {
    path: '/Booklist',
    name: 'Booklist',
    component: () => import('../views/Booklist.vue')
  },
  {
    path: '/exom',
    name: 'exom',
    component: () => import('../views/exom.vue')
  },
  {
    path: '/Home',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    children: [
      {
        path: '/Home',
        component: () => import('../views/Latest.vue')
      },
      {
        path: 'Collection',
        name: 'Collection',
        component: () => import('../views/Collection.vue')
      },
      {
        path: 'Latest',
        name: 'Latest',
        component: () => import('../views/Latest.vue')
      },
      {
        path: 'Recommend',
        name: 'Recommend',
        component: () => import('../views/Recommend.vue')
      },
      {
        path: 'Hottest',
        name: 'Hottest',
        component: () => import('../views/Hottest.vue')
      },
    ]
  },
  {
    path: '/Details',
    name: 'Details',
    component: () => import('../views/Details.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue')
  },
  {
    path: '/Search',
    name: 'Search',
    component: () => import('../views/Search.vue')
  },
  {
    path: '/Bookshelf',
    name: 'Bookshelf',
    component: () => import('../views/Bookshelf.vue')
  },
  {
    path: '/zhuce',
    name: 'zhuce',
    component: () => import('../views/zhuce.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
